import React, { Component } from 'react'
import observer from '../util/observer'

export default class Middle extends Component {

  componentDidMount(){
    observer.subscribe((data)=>{
      console.log('Middle组件接受到了其他组件的信息，信息为:',data);
    })
  }
  render() {
    return (
      <div style={{flexGrow:1,backgroundColor:'springgreen',height:'100vh'}}>
        <h1>Middle</h1>
      </div>
    )
  }
}
